import React, { Component } from 'react'

export default class Text extends Component<any> {
    constructor(props:any){
        super(props);
        this.state={
            id:""
        }
    }
    componentDidMount(){
        let x=window.location.hash;
        let id=x.substring(7)
        console.log(id);
        this.setState({
            id
        })
    }
  render() {
    return (
      <div>Text收到的参数{this.props.match.params.id}<br></br><a href='/text/2/login'>登录</a></div>

    )
  }
}
